package br.com.fatene.poo2.view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenuBar;

public class AppicationWindow {

	private JFrame frame;

	/**
	 * Launch the application.
	 */
//	public static void main(String[] args) {
//		EventQueue.invokeLater(new Runnable() {
//			public void run() {
//				try {
//					AppicationWindow window = new AppicationWindow();
//					window.frame.setVisible(true);
//				} catch (Exception e) {
//					e.printStackTrace();
//				}
//			}
//		});
//	}

	/**
	 * Create the application.
	 */
	public AppicationWindow() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(200, 200, 550, 400);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setTitle("Trabalho POO 2");
		
		JMenuBar menuBar = new JMenuBar();
		frame.setJMenuBar(menuBar);
		
		JButton btnCadastroDeClientes = new JButton("Clientes");
		btnCadastroDeClientes.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new PesquisaClienteForm();
				frame.setVisible(false);
			}
		});
		menuBar.add(btnCadastroDeClientes);
		
		/*JButton btnCadastroDeContas = new JButton("Contas");
		btnCadastroDeContas.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new CadastroContaForm();
				frame.setVisible(false);
			}
		});*/
//		menuBar.add(btnCadastroDeContas);
		frame.setVisible(true);
	}

}
